Skip to content

add new serialization and test#580

Merged
jd-lara merged 3 commits into
mainfrom
jd/add_vector_uuid_serialization
May 12, 2026
Merged

add new serialization and test#580
jd-lara merged 3 commits into
mainfrom
jd/add_vector_uuid_serialization

Conversation

@jd-lara
Copy link
Copy Markdown
Member

@jd-lara jd-lara commented May 4, 2026

This is needed for the PR in PSY for monitored components Sienna-Platform/PowerSystems.jl#1672

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends InfrastructureSystems’ JSON serialization/deserialization support to correctly handle Vector{Base.UUID} fields (needed for downstream PSY monitored components use cases), and adds a focused round-trip test to prevent regressions.

Changes:

  • Add a deserialize(::Type{Vector{Base.UUID}}, ::AbstractVector) method to convert Vector{Dict}Vector{Base.UUID} during struct deserialization.
  • Add a new testset validating UUID vector serialization/deserialization, including a JSON round-trip to mimic on-disk format.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/serialization.jl Adds a specialized deserializer for Vector{Base.UUID} so vector UUID fields don’t remain as Vector{Dict} after deserialization.
test/test_serialization.jl Adds coverage for UUID vector round-tripping through IS.serialize/IS.deserialize and JSON3 encoding/decoding.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.94%. Comparing base (4c9a97f) to head (b982476).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #580      +/-   ##
==========================================
+ Coverage   77.81%   78.94%   +1.12%     
==========================================
  Files          75       75              
  Lines        6734     6643      -91     
==========================================
+ Hits         5240     5244       +4     
+ Misses       1494     1399      -95     
Flag Coverage Δ
unittests 78.94% <100.00%> (+1.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/serialization.jl 74.80% <100.00%> (+2.00%) ⬆️

... and 32 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread test/test_serialization.jl
@jd-lara jd-lara merged commit 37825a5 into main May 12, 2026
6 of 7 checks passed
@jd-lara jd-lara deleted the jd/add_vector_uuid_serialization branch May 12, 2026 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants